
package cn.edu.hust.youth.tzb.service;

import cn.edu.hust.youth.tzb.dao.StudentDAO;


public class DAOFactory
{

	private static StudentDAO studentdao = null;
	private static String STUDENTDAO_NAME = "cn.edu.hust.youth.tzb.dao.StudentDAOImpl";

	

	
	public static StudentDAO getStudentDAO()
	{
		if (studentdao == null)
		{
			try
			{
				studentdao = (StudentDAO) Class.forName(STUDENTDAO_NAME)
						.newInstance();
			}
			catch (Exception ex)
			{
				ex.printStackTrace();
			}
		}
		return studentdao;
	}


}
